package com.hsd.mapper;

import com.hsd.entity.Advertisement;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;

public interface AdvertisementMapper {

    /**
     * 通过标记显示该标记下的所有图片
     * @param tag
     * @return
     */
    @Results(id = "advertisementRe",value = {
            @Result(id = true,property = "id",column = "ad_id"),
            @Result(property = "pic",column = "ad_pic"),
            @Result(property = "link",column = "ad_link"),
            @Result(property = "tag",column = "ad_tag")
    })
    @Select("select * from t_advertisement where ad_tag=#{tag}")
    Advertisement selectByTagToAD(String tag);
}
